// 模块
const http = require('http');

function startServer () {
  http.createServer(function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
    response.end('Hello World');
  }).listen(8081);
  console.log('Server running at http://127.0.0.1:8081/');
}

// module.exports = startServer;

// module.exports.startServer = startServer;

exports.startServer = startServer;